
export const isObject = (obj) => {
  return Object.prototype.toString.call(obj) === "[object Object]";
};
/**
 * 是否为空对象
 * @param obj
 * @return {boolean|boolean}
 */
export const emptyObject = function (obj) {
  return isObject(obj) && Object.keys(obj).length === 0;
};

/**
 * 是否为对象结构
 * @param {Object} schema
 * @returns {boolean}
 */
export const isObjectSchema = function (schema) {
  return !!(
    isObject(schema) &&
    Array.isArray(schema.children) &&
    schema.type === "object"
  );
};